package com.netx.generics.io;
import java.io.IOException;


public interface Directory extends FileObject {
	
	public boolean exists(String path) throws IOException;
	public boolean isFile(String path) throws IOException;
	public boolean isDirectory(String path) throws IOException;
	public boolean canRead(String path) throws IOException;
	public boolean canWrite(String path) throws IOException;
	
	public File getFile(String path) throws IOException;
	public File getFile(String path, boolean create) throws IOException;
	public Directory getDirectory(String path) throws IOException;
	public Directory getDirectory(String path, boolean mkdirs) throws IOException;
	
	public long getSize(boolean expanded) throws IOException;

	public File createFile(String name, boolean force) throws IOException;
	public File createFile(String name) throws IOException;
	public Directory mkdirs(String path) throws IOException;
	public void delete(boolean force) throws IOException;
	
	public String[] listFiles() throws IOException;
	public String[] listFiles(SearchOptions options) throws IOException;
	public String[] listDirectories() throws IOException;
	public String[] listDirectories(SearchOptions options) throws IOException;
	public String[] listAll() throws IOException;
	public String[] listAll(SearchOptions options) throws IOException;
	
	public File[] getFiles() throws IOException;
	public File[] getFiles(SearchOptions options) throws IOException;
	public Directory[] getDirectories() throws IOException;
	public Directory[] getDirectories(SearchOptions options) throws IOException;
	public FileObject[] getAll() throws IOException;
	public FileObject[] getAll(SearchOptions options) throws IOException;
	
	public String[] searchFile(String name) throws IOException;
	public String[] searchFile(String name, boolean showHidden) throws IOException;
	public String[] searchFile(SearchOptions options) throws IOException;
	public String[] searchDirectory(String name) throws IOException;
	public String[] searchDirectory(String name, boolean showHidden) throws IOException;
	public String[] searchDirectory(SearchOptions options) throws IOException;
	public String[] searchAll(String name) throws IOException;
	public String[] searchAll(String name, boolean showHidden) throws IOException;
	public String[] searchAll(SearchOptions options) throws IOException;
	
	public void copyTo(Directory dir, SearchOptions options) throws IOException;
	public void copyTo(Directory dir, String name, SearchOptions options) throws IOException;
}
